title = "新品"
url = "/daily-new.html"
layout = 'default'
==
use Jason\Ccshop\Models\Product;
function onStart(){
$pids = get('id_sort')?get('id_sort'):null;
$pageNumber = get('page')?get('page'):1;
if(!empty($pids)){
Cookie::queue('idssort',$pids);

Cookie::queue('pagenumber',$pageNumber);
}else{
$pids = Cookie::get('idssort');
}

$pida = explode(',',$pids);
$pd = Product::InStock()->whereIn('id',$pida)->get();
$this['adproducts'] = $pd;
$this['pida'] = $pida;
}
==
{% partial 'catalog/ad-product' adproducts=adproducts pida=pida   %}
<div class="category_content">
    <div class="itemList">
        <ul class="listUl">
            {% set newProdct200 = catalog.productSection('new-product-200').items %}
            {% if count(newProdct200) == 0 %}
            <p class="searchPrompt">大変申し訳ありませんが、関連商品は見つけませんでした。</p>
            {% else %}
            {% partial 'catalog/list-products' products = newProdct200 %}
            {% endif %}
        </ul>
    </div>
</div>